package logic.common.player.playerListeners;

import networking.messages.syncMessages.ValueType;
import logic.status.AbsChangedEvent;
import logic.status.StatusChangedEvent;
import logic.status.StatusValueContainer;
import logic.status.StatusValueManager;

public class PlayerStatusManager extends StatusValueManager<PlayerValueListener> {
	
	public PlayerStatusManager() {
		super(PlayerValueListener.class);
	}
	
	@Override
	public StatusValueContainer<PlayerValueListener> getNewContainer(float diff) {
		return new StatusValueContainer<PlayerValueListener>(diff, listenerClass) {
			@Override
			protected String getListenerMethod() { return PlayerValueListener.VALUECHANGED; }
			
			@Override
			protected AbsChangedEvent getEvent(ValueType type, Object newValue) {
				return new StatusChangedEvent(type, newValue);
			}
		};
	}
}